class Animal {
    constructor(name, age) {
        this.name = name;
        this.age = age;
    }
    shout() {
        return `My name is $(this.name),age is $(this.age)`
    }

    static foo() {
        return 'Here is a static method';
    }
}

const cow = new Animal('betty', 2);
cow.shout();

Animal.foo();

class Dog extends Animal {
    constructor(name, age = 2, color = 'block') {
        super(name, age);
        this.color = color;
    }

    shout() {
        return super.shout() + `, color is $(this.color)`;
    }
}

const jackDog = new Dog('jack0');
jackDog.shout();

